<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/tabooExpire.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('tabooExpire_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">includes/tabooExpire.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="edgeID_8h_source.html">edgeID.h</a>&quot;</code><br/>
<code>#include &lt;stdbool.h&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for tabooExpire.h:</div>
<div class="dyncontent">
<div class="center"><img src="tabooExpire_8h__incl.png" border="0" usemap="#includes_2tabooExpire_8h" alt=""/></div>
<map name="includes_2tabooExpire_8h" id="includes_2tabooExpire_8h">
<area shape="rect" id="node3" href="edgeID_8h.html" title="edgeID.h" alt="" coords="91,83,165,112"/></map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="tabooExpire_8h__dep__incl.png" border="0" usemap="#includes_2tabooExpire_8hdep" alt=""/></div>
<map name="includes_2tabooExpire_8hdep" id="includes_2tabooExpire_8hdep">
<area shape="rect" id="node3" href="tabooList_8h.html" title="includes/tabooList.h" alt="" coords="408,83,547,112"/><area shape="rect" id="node38" href="ALGConfiguration_8h.html" title="includes/ALGConfiguration.h" alt="" coords="680,237,867,267"/><area shape="rect" id="node5" href="add_8h.html" title="includes/add.h" alt="" coords="841,392,948,421"/><area shape="rect" id="node7" href="operations_8h.html" title="includes/operations.h" alt="" coords="136,160,280,189"/><area shape="rect" id="node20" href="remove_8h.html" title="includes/remove.h" alt="" coords="341,392,469,421"/><area shape="rect" id="node22" href="swap_8h.html" title="includes/swap.h" alt="" coords="53,392,168,421"/><area shape="rect" id="node31" href="tabooState_8h.html" title="includes/tabooState.h" alt="" coords="504,237,651,267"/><area shape="rect" id="node9" href="solution_8h.html" title="includes/solution.h" alt="" coords="225,237,356,267"/><area shape="rect" id="node18" href="ltm_8h.html" title="includes/ltm.h" alt="" coords="307,547,408,576"/><area shape="rect" id="node11" href="los_8h.html" title="includes/los.h" alt="" coords="595,315,696,344"/><area shape="rect" id="node14" href="stm_8h.html" title="includes/stm.h" alt="" coords="592,392,699,421"/><area shape="rect" id="node24" href="graphbmp-tools_8h.html" title="includes/graphbmp&#45;tools.h" alt="" coords="245,315,419,344"/><area shape="rect" id="node16" href="LTMConfiguration_8h.html" title="includes/LTMConfiguration.h" alt="" coords="548,469,735,499"/><area shape="rect" id="node41" href="configparser_8h.html" title="includes/configparser.h" alt="" coords="821,315,976,344"/></map>
</div>
</div>
<p><a href="tabooExpire_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tabooExpire_8h.html#a40dafe904f03cb1b563527f1298d2835">initTabooExpire</a> (int _tenure, <a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a> now)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tabooExpire_8h.html#a7d289bc9ace369c7cc3a9ae3c309f985">freeTabooExpire</a> (<a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a> taboo)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tabooExpire_8h.html#a3017f559607bfbcd119c1f80e1d50673">isTaboo</a> (<a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a> taboo, <a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a> now)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tabooExpire_8h.html#aeccb07ce544f79565d0acd4d5c9d8ffc">printTabooExpire</a> (FILE *f, <a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a> taboo)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tabooExpire_8h.html#a31fef7904fa4b65a5693ca5025a55044">getTenure</a> (<a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a> t, <a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a> now)</td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a32d5352feec4ff93a63190069d9df410"></a><!-- doxytag: member="tabooExpire.h::PtabooExpire" ref="a32d5352feec4ff93a63190069d9df410" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a>* <a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Utile se si vogliono gestire dei taboo tramite passaggio per riferimento. </p>

</div>
</div>
<a class="anchor" id="a03a425df65af050afbb5cab3c16f4263"></a><!-- doxytag: member="tabooExpire.h::TabooExpire" ref="a03a425df65af050afbb5cab3c16f4263" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef unsigned long <a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>rappresenta la data di espirazione di un singolo Taboo.Il meccanismo di taboo prevede 2 elementi: un contatore incrementale (clock) che viene incrementato ad ogni iterazione dell'algoritmo e una matrice implementante la Taboo List. tale matrice ha come elemento base la struttura Taboo. Il programma, per comprendere se un arco e' taboo oppure no effettua un confronto tra il valore del clock attuale, il valore di tenure e il timeStamp secondo la regola: </p>
<p><em>is taboo if time_current &lt;= edge.timestamp+edge+tenure;</em> Questo a livello fisico viene implementato secondo una specie di "cookie": il TabooDataExpiration e' fondamentalmente una data di espirazione di un dato taboo, ossia un valore del clock. Se il valore attuale del clock e' maggiore della data di espirazione il dato e' considerato obsoleto. Tale struttura indica il numero dell'iterazione a cui è prevista la scadenza dell'appartenenza dell'arco alla Taboo List </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a7d289bc9ace369c7cc3a9ae3c309f985"></a><!-- doxytag: member="tabooExpire.h::freeTabooExpire" ref="a7d289bc9ace369c7cc3a9ae3c309f985" args="(PtabooExpire taboo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="tabooExpire_8h.html#a7d289bc9ace369c7cc3a9ae3c309f985">freeTabooExpire</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a>&#160;</td>
          <td class="paramname"><em>taboo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>libera la memoria da questo taboo </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">taboo</td><td>il taboo da deallocare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a31fef7904fa4b65a5693ca5025a55044"></a><!-- doxytag: member="tabooExpire.h::getTenure" ref="a31fef7904fa4b65a5693ca5025a55044" args="(PtabooExpire t, TabooExpire now)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="tabooExpire_8h.html#a31fef7904fa4b65a5693ca5025a55044">getTenure</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a>&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a>&#160;</td>
          <td class="paramname"><em>now</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>questo metodo dovrebbe essere usato solo dalle procedure di stampa; la business logic dovrebbe interrogare solo <a class="el" href="tabooExpire_8h.html#a3017f559607bfbcd119c1f80e1d50673">isTaboo()</a>. se un giorno nascessere criteri di aspirazione basati su 'quanta tenure manchi a un edge', avrebbe senso che la logica interrogasse <a class="el" href="tabooExpire_8h.html#a31fef7904fa4b65a5693ca5025a55044">getTenure()</a>.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>il file su cui stampare </td></tr>
    <tr><td class="paramname">taboo</td><td>il taboo da confrontare </td></tr>
    <tr><td class="paramname">now</td><td>l'iterazione corrente dell'algoritmo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>la differenza tra l'iterazione di scadenza del taboo e quella corrente, ovvero il TENURE TIME. qualora la differenza sia negativa, la clippa a zero. </dd></dl>

</div>
</div>
<a class="anchor" id="a40dafe904f03cb1b563527f1298d2835"></a><!-- doxytag: member="tabooExpire.h::initTabooExpire" ref="a40dafe904f03cb1b563527f1298d2835" args="(int _tenure, TabooExpire now)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a> <a class="el" href="tabooExpire_8h.html#a40dafe904f03cb1b563527f1298d2835">initTabooExpire</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>_tenure</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a>&#160;</td>
          <td class="paramname"><em>now</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>costruisce un nuovo taboo </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">_tenure</td><td>indica la tenure del nuovo taboo </td></tr>
    <tr><td class="paramname">now</td><td>l'iterazione corrente dell'algoritmo, cioè quella di creazione. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un puntatore alla variabile TabooDataExpiration </dd></dl>

</div>
</div>
<a class="anchor" id="a3017f559607bfbcd119c1f80e1d50673"></a><!-- doxytag: member="tabooExpire.h::isTaboo" ref="a3017f559607bfbcd119c1f80e1d50673" args="(PtabooExpire taboo, TabooExpire now)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="tabooExpire_8h.html#a3017f559607bfbcd119c1f80e1d50673">isTaboo</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a>&#160;</td>
          <td class="paramname"><em>taboo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a>&#160;</td>
          <td class="paramname"><em>now</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>verifica se questo oggetto e' ancora sotto taboo oppure no</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">taboo</td><td>il taboo da verificare </td></tr>
    <tr><td class="paramname">now</td><td>l'iterazione corrente dell'algoritmo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE se taboo&gt;=now, FALSE altrimenti </dd></dl>

</div>
</div>
<a class="anchor" id="aeccb07ce544f79565d0acd4d5c9d8ffc"></a><!-- doxytag: member="tabooExpire.h::printTabooExpire" ref="aeccb07ce544f79565d0acd4d5c9d8ffc" args="(FILE *f, PtabooExpire taboo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="tabooExpire_8h.html#aeccb07ce544f79565d0acd4d5c9d8ffc">printTabooExpire</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooExpire_8h.html#a32d5352feec4ff93a63190069d9df410">PtabooExpire</a>&#160;</td>
          <td class="paramname"><em>taboo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>stampa in modo leggibile il taboo specificato. Il comportamento della funzione e' imprevedibile qualora il taboo passato sia NULL</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>il file su cui stampare il taboo </td></tr>
    <tr><td class="paramname">taboo</td><td>il taboo da stampare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="tabooExpire_8h.html">tabooExpire.h</a>      </li>

    <li class="footer">Generated on Thu Jun 27 2013 11:34:37 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
